

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import org.wizehack.mri.test.BasicTestSuite;
import org.wizehack.mri.test.TestSuite;
import org.wizehack.mri.testSet.MixedRegionbasedSelection;

public class MixedRegionbasedSelectionTest {
	private static String DIR = "/home/hsyoun/workspace/jgraphx/ExprData/data";
	private static String EXP_DIR = "/home/hsyoun/workspace/jgraphx/ExprData/data/";
	private static String XML_DTD = "/home/hsyoun/workspace/jgraphx/ExprData/data/report.dtd";

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		MixedRegionbasedSelection mSelectionStrategy = new MixedRegionbasedSelection();
		System.out.println("Mixed Region based Selection Test");

		List<String> failedCoverageFileList = new ArrayList<String>();
		failedCoverageFileList.add(DIR + "/2-5_fault_pagesetup.xml");
		failedCoverageFileList.add(DIR + "/3-5_fault_about.xml");
		failedCoverageFileList.add(DIR + "/2-4_fault_vdx.xml");

		TestSuite testSuite = new BasicTestSuite();
		mSelectionStrategy.setFailedCoverageFileList(failedCoverageFileList);
		mSelectionStrategy.setDirectory(DIR + File.separator);
		List<TestSuite> tSuiteList = new ArrayList<TestSuite>();
		tSuiteList.add(testSuite);
		
		List<TestSuite> testSuiteList = mSelectionStrategy.select(tSuiteList);
		
		mSelectionStrategy.exportTo(testSuiteList, EXP_DIR, XML_DTD);
	}

}
